import Vue from 'vue'
import Router from 'vue-router'

//导入
import home from '@/components/tabbar/HomeContainer.vue'
import member from '@/components/tabbar/MemberContainer.vue'
import shopcar from '@/components/tabbar/ShopCarContainer.vue'
import search from '@/components/tabbar/SearchContain.vue'
import newlist from '../components/newscomponent/NewsList.vue'
import newinfo from '../components/newscomponent/NewsInfo.vue'
import photolist from '../components/photocomponents/PhotoList.vue'
import photoinfo from '../components/photocomponents/PhotoInfo.vue'
import goodslist from '../components/goods/GoodsList.vue'
import goodsinfo from '../components/goods/GoodsInfo.vue'
import goodsdesc from '../components/goods/GoodsDesc.vue'
import goodscomment from '../components/goods/GoodsComment.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:home},
    {path:'/member',component:member},
    {path:'/shopcar',component:shopcar},
    {path:'/search',component:search},
    {path:'/home/newlist',component:newlist},
    {path:'/home/newinfo/:id',component:newinfo},
    {path:'/home/photolist',component:photolist},
    {path:'/home/photoinfo/:id',component:photoinfo},
    {path:'/home/goodslist',component:goodslist},
    {path:'/home/goodsinfo/:id',component:goodsinfo,name:'goodsinfo'},
    {path:'/home/goodsdesc/:id',component:goodsdesc},
    {path:'/home/goodscomment/:id',component:goodscomment,name:'goodscomment'}
  ],
  linkActiveClass:'mui-active'
})
